﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DanhSachDanhMuc_LeftSideBar.ascx.cs"
    Inherits="UserControl_DanhSachDanhMuc_LeftSideBar" %>

   
    
        <!--Đã xóa phần Java Script treeManagement-->
        <!-- Block categories module -->
        <div id="categories_block_left" class="block">
            <h4>
                <asp:Label ID="Label18" runat="server" Text="DANH MỤC CHÍNH"></asp:Label>
            </h4>
            <div class="block_content">
                <ul class="tree dhtml">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MaDanhMucChinh"
                        DataSourceID="SqlDataSource1" GridLines="None" Width="142px" ShowHeader="False">
                        <Columns>
                            <asp:TemplateField SortExpression="TenDanhMucChinh" ShowHeader="False">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TenDanhMucChinh") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("MaDanhMucChinh", "~/RaoVat/DanhMucChinh.aspx?id={0}") %>'
                                        Text='<%# Eval("TenDanhMucChinh") %>'></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="MaDanhMucChinh" HeaderText="MaDanhMucChinh" InsertVisible="False"
                                ReadOnly="True" SortExpression="MaDanhMucChinh" Visible="False" ShowHeader="False" />
                        </Columns>
                        <HeaderStyle Height="0px" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RAOVATConnectionString %>"
                        SelectCommand="SELECT [TenDanhMucChinh], [MaDanhMucChinh] FROM [DANH_MUC_CHINH] WHERE ([Deleted] = @Deleted) ORDER BY [TenDanhMucChinh]">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="Deleted" Type="Boolean" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ul>
            </div>
        </div>
        <!-- /Block categories module -->
        <!-- Block manufacturers module -->
        <div id="manufacturers_block_left" class="block blockmanufacturer">
            <h4>
                <a href="" title="Manufacturers">
                    <asp:Label ID="Label17" runat="server" Text="DANH MỤC CHI TIẾT"></asp:Label>
                </a>
            </h4>
            <div class="block_content">
                <ul class="bullet">
                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="MaDanhMucCon"
                        DataSourceID="SqlDataSource2" GridLines="None" Width="129px" ShowHeader="False">
                        <Columns>
                            <asp:TemplateField ShowHeader="False" SortExpression="TenDanhMucCon">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TenDanhMucCon") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("MaDanhMucCon", "~/RaoVat/DanhSachTinRaoVatThuocDanhMucCon.aspx?id={0}") %>'
                                        Text='<%# Eval("TenDanhMucCon") %>'></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="MaDanhMucCon" HeaderText="MaDanhMucCon" InsertVisible="False"
                                ReadOnly="True" ShowHeader="False" SortExpression="MaDanhMucCon" Visible="False" />
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RAOVATConnectionString %>"
                        SelectCommand="SELECT [TenDanhMucCon], [MaDanhMucCon] FROM [DANH_MUC_CON] WHERE ([Deleted] = @Deleted)">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="Deleted" Type="Boolean" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ul>
            </div>
       </div>
